
def differ():
    list1=['1','2','3','4']
    list2=[]
    x=0
    for i in list1:
        # print (i+'oo')
        for y in list1:
            # print(y+'yy')
            for m in list1:
                # print (m+'mm')
                if i !=y and y!=m and i!=m:
                    t=i+y+m
                    list2.append(t);
                    x+=int(t)
    # print (x)
    avg1=x/len(list2)

    # print (i+y+m+'\t')
    print ('共有',len(list2),'个不同的值')
    print ('平均值为：',avg1)


if __name__ == '__main__':
    differ()

